#!/bin/sh

# don't cripple the image to be copied over
[ -x /usr/sbin/live-install -o -x /usr/sbin/livecd-install -o -n "$GLOBAL_LIVE_INSTALL" ] &&
	exit 0

# blacklisted kernel modules
sed -n 's/^blacklist[[:space:]]\+\([^[:space:]]\+\).*/\1/p' /etc/modprobe.d/* |
	while read i; do
		find /lib/modules/ -type f -name "$i.ko" -delete
	done

:
